package shapes;

import java.awt.Color;
import java.awt.Graphics;

import trajectories.Directions;
import trajectories.Trajectory;

public abstract class Shape {

    private static final int width = 30;
    private static final int height = 30;

    public int xPos;
    public int yPos;
    public Color color;
    public Trajectory trajectory;

    public Directions getTrajectoryDirection() {
        return trajectory.getTrajectoryDirection();
    }

    public void setTrajectoryDirection(Directions directions) {
        this.trajectory.setTrajectoryDirection(directions);
    }

    public abstract void paintComponent(Graphics g);

    public void move() {
        trajectory.x = xPos;
        trajectory.y = yPos;
        trajectory.move();
        xPos = trajectory.x;
        yPos = trajectory.y;

    }

    public static int getWidth() {
        return width;
    }

    public static int getHeight() {
        return height;
    }

}
